package cn.iocoder.yudao.module.of.dal.mysql.schedulepart;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.of.dal.dataobject.schedulepart.SchedulePartDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.of.controller.admin.schedulepart.vo.*;

/**
 * 日程中心参与者 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface SchedulePartMapper extends BaseMapperX<SchedulePartDO> {

    default PageResult<SchedulePartDO> selectPage(SchedulePartPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<SchedulePartDO>()
                .eqIfPresent(SchedulePartDO::getUserId, reqVO.getUserId())
                .eqIfPresent(SchedulePartDO::getDeptId, reqVO.getDeptId())
                .eqIfPresent(SchedulePartDO::getDeptUserId, reqVO.getDeptUserId())
                .betweenIfPresent(SchedulePartDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(SchedulePartDO::getId));
    }

}